import java.util.Locale;
import java.util.Scanner;

public class Main {
    private static boolean isNumberAndCharater(char ch){
        if(Character.isDigit(ch) && Character.isLetter(ch)){
            return true;
        }
        return false;
    }
    //检查字符串是不是回文串
    public static boolean ishuiwen(String s){
        s = s.toLowerCase(Locale.ROOT);
        int left = 0;
        int right = s.length() - 1;
        while (left < right) {
            while (left < right && !isNumberAndCharater(s.charAt(left))) {
                left++;
            }
            while (left < right && !isNumberAndCharater(s.charAt(right))){
                right--;
            }
            if(s.charAt(left) == s.charAt(right)){
                left++;
                right--;
            }else {
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String s = scan.nextLine();
        boolean tun = ishuiwen(s);
        System.out.println(tun);
    }

    public static void main12(String[] args) {
        //计算字符串最后一个单词的长度
        //1.字符串分割  split()
        //2.从最后往前的第一个空格的下标，然后截取空格后的字符串，然后求长度   lastindexOf()  subString
        Scanner scan = new Scanner(System.in);
        String s = scan.nextLine();
        String[] ch = s.split(" ");
        System.out.println(ch[ch.length-1].length());


        int a = s.lastIndexOf(" ");
        String news = s.substring(a+1);//这里截取的时候+1
        System.out.println(news.length());
    }
}
